Skip to content

Add aspect ratio selector to video player#50

Open
4in4in wants to merge 1 commit into
InfinityLoop1308:devfrom
4in4in:feature/aspect-ratio-selector
Open

Add aspect ratio selector to video player#50
4in4in wants to merge 1 commit into
InfinityLoop1308:devfrom
4in4in:feature/aspect-ratio-selector

Conversation

@4in4in

@4in4in 4in4in commented Jun 12, 2026

Copy link
Copy Markdown

What

Adds an aspect ratio selector to the main video player, next to the existing resize mode (FIT/FILL/ZOOM) button.

  • Auto (default) — use the video's own aspect ratio
  • 1:1, 4:3, 16:9, 18:9, 21:9 — force a fixed ratio
  • Custom… — dialog accepting 16:9, 16/9 or decimal 1.78 input

Why

Some videos are uploaded with wrong proportions (typically old 4:3 content stretched to 16:9, or anamorphic video without proper metadata). The resize modes can't fix that — they change how the video fits the screen, not the picture's own proportions. Forcing the correct ratio is the only way to watch such videos undistorted. VLC and MX Player offer the same control.

Behavior details

  • The choice is per-video: it resets to Auto when playback moves to a different stream. A forced ratio is a correction for a specific broken video, so it intentionally doesn't persist (avoids the "why is everything stretched now" trap).
  • Quality changes of the same stream do not reset the choice (the reset hooks into onMetadataChanged, which only fires when the stream URL actually changes).
  • Vertical-video detection and screen rotation still use the stream's natural dimensions.
  • The button is hidden in the popup player, same as the resize mode button.

@4in4in 4in4in force-pushed the feature/aspect-ratio-selector branch from 28296c0 to 0533094 Compare June 12, 2026 15:14
Adds a button next to the resize mode toggle that lets the user force the
video aspect ratio: Auto (video's own), 1:1, 4:3, 16:9, 18:9, 21:9, or a
custom value entered as '16:9', '16/9' or '1.78'. Useful for videos that
were uploaded with wrong proportions (e.g. 4:3 content stretched to 16:9).

The choice is per-video: it resets to Auto when playback moves to a
different stream, but survives quality changes of the same stream. Hidden
in the popup player, like the resize mode button.
@4in4in 4in4in force-pushed the feature/aspect-ratio-selector branch from 0533094 to 3d9ff44 Compare June 12, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant